export const getEnvFromUrl = () => {
  if (typeof window !== "undefined") {
    const host = window.location.host;
    const group = host.split('.')[0];
    let env;
    if (host.indexOf('dev.dms.com') > -1 || host.indexOf('localhost') > -1) {
      env = 'dev';
    } else if (host.indexOf('beta.dms') > -1) {
      env = 'beta';
    } else {
      env = 'prod';
    }
    return {
      env,
      group,
    };
  }
  return {
    env: 'prod'
  }
};

const ENV = getEnvFromUrl();
export default ENV
